package net.dopan.pigframe.demo.model.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.*;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 活动参与表
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName("user_activity_participant")
public class UserActivityParticipant extends Model<UserActivityParticipant> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "activity_id",type = IdType.INPUT)
    @NotNull
    private Integer activityId;
    @TableId(value = "user_id",type = IdType.INPUT)
    @NotNull
    private Integer userId;

    @Override
    protected Serializable pkVal() {
        return this.userId;
    }
}